﻿using System;
using UnityEngine;

// Token: 0x020001C3 RID: 451
public class Gravity : MonoBehaviour
{
	// Token: 0x0600097A RID: 2426 RVA: 0x00056AA0 File Offset: 0x00054CA0
	private void Start()
	{
		this.rbody = base.gameObject.GetComponent<Rigidbody>();
		if (!this.rbody)
		{
			base.gameObject.AddComponent<Rigidbody>();
		}
		this.rbody.useGravity = false;
		this.myTransfom = base.transform;
	}

	// Token: 0x0600097B RID: 2427 RVA: 0x00056AF4 File Offset: 0x00054CF4
	private void FixedUpdate()
	{
		float num = this.myTransfom.lossyScale.y * this.baseScale;
		this.rbody.AddForce(new Vector3(0f, -Gravity.gravity * num, 0f));
	}

	// Token: 0x04000F14 RID: 3860
	public static float gravity = 9.8f;

	// Token: 0x04000F15 RID: 3861
	public float baseScale = 1f;

	// Token: 0x04000F16 RID: 3862
	private Rigidbody rbody;

	// Token: 0x04000F17 RID: 3863
	private Transform myTransfom;
}
